3.351 \(\int \frac{\tanh (c+d x)}{a+b \sinh (c+d x)} \, dx\)

Optimal. Leaf size=69 \[ -\frac{a \log (a+b \sinh (c+d x))}{d \left (a^2+b^2\right )}+\frac{b \tan ^{-1}(\sinh (c+d x))}{d \left (a^2+b^2\right )}+\frac{a \log (\cosh (c+d x))}{d \left (a^2+b^2\right )} \]

[Out]

(b*ArcTan[Sinh[c + d*x]])/((a^2 + b^2)*d) + (a*Log[Cosh[c + d*x]])/((a^2 + b^2)*d) - (a*Log[a + b*Sinh[c + d*x
]])/((a^2 + b^2)*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0769974, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.263, Rules used = {2721, 801, 635, 203, 260} \[ -\frac{a \log (a+b \sinh (c+d x))}{d \left (a^2+b^2\right )}+\frac{b \tan ^{-1}(\sinh (c+d x))}{d \left (a^2+b^2\right )}+\frac{a \log (\cosh (c+d x))}{d \left (a^2+b^2\right )} \]

Antiderivative was successfully verified.

[In]

Int[Tanh[c + d*x]/(a + b*Sinh[c + d*x]),x]

[Out]

(b*ArcTan[Sinh[c + d*x]])/((a^2 + b^2)*d) + (a*Log[Cosh[c + d*x]])/((a^2 + b^2)*d) - (a*Log[a + b*Sinh[c + d*x
]])/((a^2 + b^2)*d)

Rule 2721

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rubi steps

\begin{align*} \int \frac{\tanh (c+d x)}{a+b \sinh (c+d x)} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{x}{(a+x) \left (-b^2-x^2\right )} \, dx,x,b \sinh (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{a}{\left (a^2+b^2\right ) (a+x)}+\frac{-b^2-a x}{\left (a^2+b^2\right ) \left (b^2+x^2\right )}\right ) \, dx,x,b \sinh (c+d x)\right )}{d}\\ &=-\frac{a \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right ) d}-\frac{\operatorname{Subst}\left (\int \frac{-b^2-a x}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{\left (a^2+b^2\right ) d}\\ &=-\frac{a \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right ) d}+\frac{a \operatorname{Subst}\left (\int \frac{x}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{\left (a^2+b^2\right ) d}+\frac{b^2 \operatorname{Subst}\left (\int \frac{1}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{\left (a^2+b^2\right ) d}\\ &=\frac{b \tan ^{-1}(\sinh (c+d x))}{\left (a^2+b^2\right ) d}+\frac{a \log (\cosh (c+d x))}{\left (a^2+b^2\right ) d}-\frac{a \log (a+b \sinh (c+d x))}{\left (a^2+b^2\right ) d}\\ \end{align*}

Mathematica [A]  time = 0.0767782, size = 51, normalized size = 0.74 \[ \frac{a (\log (\cosh (c+d x))-\log (a+b \sinh (c+d x)))+2 b \tan ^{-1}\left (\tanh \left (\frac{1}{2} (c+d x)\right )\right )}{d \left (a^2+b^2\right )} \]

Antiderivative was successfully verified.

[In]

Integrate[Tanh[c + d*x]/(a + b*Sinh[c + d*x]),x]

[Out]

(2*b*ArcTan[Tanh[(c + d*x)/2]] + a*(Log[Cosh[c + d*x]] - Log[a + b*Sinh[c + d*x]]))/((a^2 + b^2)*d)

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 113, normalized size = 1.6 \begin{align*} -2\,{\frac{a\ln \left ( \left ( \tanh \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}a-2\,\tanh \left ( 1/2\,dx+c/2 \right ) b-a \right ) }{d \left ( 2\,{a}^{2}+2\,{b}^{2} \right ) }}+2\,{\frac{a\ln \left ( \left ( \tanh \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}+1 \right ) }{d \left ( 2\,{a}^{2}+2\,{b}^{2} \right ) }}+4\,{\frac{b\arctan \left ( \tanh \left ( 1/2\,dx+c/2 \right ) \right ) }{d \left ( 2\,{a}^{2}+2\,{b}^{2} \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tanh(d*x+c)/(a+b*sinh(d*x+c)),x)

[Out]

-2/d*a/(2*a^2+2*b^2)*ln(tanh(1/2*d*x+1/2*c)^2*a-2*tanh(1/2*d*x+1/2*c)*b-a)+2/d/(2*a^2+2*b^2)*a*ln(tanh(1/2*d*x
+1/2*c)^2+1)+4/d/(2*a^2+2*b^2)*b*arctan(tanh(1/2*d*x+1/2*c))

________________________________________________________________________________________

Maxima [A]  time = 1.60528, size = 128, normalized size = 1.86 \begin{align*} -\frac{2 \, b \arctan \left (e^{\left (-d x - c\right )}\right )}{{\left (a^{2} + b^{2}\right )} d} - \frac{a \log \left (-2 \, a e^{\left (-d x - c\right )} + b e^{\left (-2 \, d x - 2 \, c\right )} - b\right )}{{\left (a^{2} + b^{2}\right )} d} + \frac{a \log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{{\left (a^{2} + b^{2}\right )} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="maxima")

[Out]

-2*b*arctan(e^(-d*x - c))/((a^2 + b^2)*d) - a*log(-2*a*e^(-d*x - c) + b*e^(-2*d*x - 2*c) - b)/((a^2 + b^2)*d)
+ a*log(e^(-2*d*x - 2*c) + 1)/((a^2 + b^2)*d)

________________________________________________________________________________________

Fricas [A]  time = 2.13869, size = 247, normalized size = 3.58 \begin{align*} \frac{2 \, b \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) - a \log \left (\frac{2 \,{\left (b \sinh \left (d x + c\right ) + a\right )}}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) + a \log \left (\frac{2 \, \cosh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right )}{{\left (a^{2} + b^{2}\right )} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="fricas")

[Out]

(2*b*arctan(cosh(d*x + c) + sinh(d*x + c)) - a*log(2*(b*sinh(d*x + c) + a)/(cosh(d*x + c) - sinh(d*x + c))) +
a*log(2*cosh(d*x + c)/(cosh(d*x + c) - sinh(d*x + c))))/((a^2 + b^2)*d)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tanh{\left (c + d x \right )}}{a + b \sinh{\left (c + d x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(d*x+c)/(a+b*sinh(d*x+c)),x)

[Out]

Integral(tanh(c + d*x)/(a + b*sinh(c + d*x)), x)

________________________________________________________________________________________

Giac [A]  time = 1.44589, size = 115, normalized size = 1.67 \begin{align*} \frac{\frac{2 \, b \arctan \left (e^{\left (d x + c\right )}\right )}{a^{2} + b^{2}} + \frac{a \log \left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}{a^{2} + b^{2}} - \frac{a \log \left ({\left | b e^{\left (2 \, d x + 2 \, c\right )} + 2 \, a e^{\left (d x + c\right )} - b \right |}\right )}{a^{2} + b^{2}}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tanh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="giac")

[Out]

(2*b*arctan(e^(d*x + c))/(a^2 + b^2) + a*log(e^(2*d*x + 2*c) + 1)/(a^2 + b^2) - a*log(abs(b*e^(2*d*x + 2*c) +
2*a*e^(d*x + c) - b))/(a^2 + b^2))/d